﻿using System;
using System.Globalization;
using System.Windows.Data;
using Foundation.MarkupExtensions;

namespace Poet.Converters
{
    public class ItemsSelectorTextConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            var text = Localizing.ProvideValue("_N_Of_M_ItemsSelected");
            return string.Format(text, values[0], values[1]);
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
